from datetime import datetime


class SimScoreDO:
    def __init__(
        self,
        id: int,
        baseSample: str,
        targetSamples: str,
        operatorName: str,
        modifyTime: datetime,
        simScore: str,
        simType: int,
    ):
        self.id = id
        self.baseSample = baseSample
        self.targetSamples = targetSamples
        self.operatorName = operatorName
        self.modifyTime = modifyTime
        self.simScore = simScore
        self.simType = simType

    def DO2Dict(self):
        return {
            "id": self.id,
            "base_sample": self.baseSample,
            "target_samples": self.targetSamples,
            "operator_name": self.operatorName,
            "modify_time": self.modifyTime.strftime(
                "%Y-%m-%d %H:%M:%S"
            ),  # 格式化日期时间
            "sim_score": self.simScore,
            "sim_type": self.simType,
        }
